<!--{include(file='head.html')}-->

<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c" >
			<form name="seaform" id="seaform" action="<!--{url('admin','tag','tagitem')}-->" method="post">
			<div class="bt_bk">
				<span class="btn">
					<a href="javascript:void(0);" onclick="$.oper.refresh();return false;">刷新</a>
				</span>
				<select name="tagid" id="tagid">
					<!--{$tagopt}-->
				</select>
				<span class="state_tip"></span>
			</div>
			</form>
			<form name="submitform" id="submitform" action="<!--{url('admin','tag','tagitemsave')}-->" method="post">
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="35%">操作</th>
						<th width="60%">该标签下商品</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $items item}-->
					<tr align="center"  id="tr_<!--{$item.itemid}-->_<!--{$tagid}-->">
						<td>
							<input type="hidden" value="<!--{$item.itemid}-->" name="itemid[]"/>
							<a href="javascript:void(0);" onclick="$.oper.cdelete('<!--{$item.itemid}-->_<!--{$tagid}-->');return false;" class="del" title="删除"></a>
							<a href="javascript:void(0);" onclick="$.oper.up(this);return false;" class="up" title="上移"></a>
							<a href="javascript:void(0);" onclick="$.oper.down(this);return false;" class="down" title="下移"></a>
						</td>
						<td align="left">
							<img src = "<!--{$item.itemimg}-->_50x50.jpg" width="50" height="50" onerror="this.onerror='',this.src='images/nopicture.jpg'" class="mid"/>
							<span><!--{$item.itemname}--></span>
						</td>
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
			<!--{if $items}-->
			<div class="bt_bk2">
				<input type="hidden" value="save"					name="opertype" />
				<input type="hidden" value="<!--{def($tagid)}-->"	name="tagid" />
				<a href="javascript:void(0);" class="btn" onclick="$.oper.submit();return false;"><span>保存</span></a>
			</div>
			<!--{/if}-->
			</form>
			
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	$("#tagid").change(function(){
		$.page.reset();
		$.oper.seasubmit();
	});
	$.oper.init("<!--{url('admin','tag','tagitemsave')}-->");
});
</script>